<!DOCTYPE html>
<html>
    <head lang="en">
        <meta charset="UTF-8">
        <meta name="csrf-token" content="{{ csrf_token() }}">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">	
        <link rel="shortcut icon" type="image/x-icon" href="{{URL::asset('handan/images/logo-icon.png')}}" />
        <title>分析师</title>
        <link rel="stylesheet" href="{{URL::asset('mobile/css/public.css') }}"/>
        <link rel="stylesheet" href="{{URL::asset('mobile/css/analystCenter.css') }}"/>
        <script type="text/javascript" src="http://cdn.webfont.youziku.com/wwwroot/js/wf/youziku.api.min.js"></script>
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"> </script>
		<script type="text/javascript">
			$youziku.load(".numZi", "3457a57b538e4214b883cfa3e984c251", "PingFangSCB");
			$youziku.draw();
		</script>
    </head>
<body>
<!-- 头像设置 -->
<div class="j_pohto">
	<div >
		<div>
			@if(session('eai')['id'] && (session('eai')['id'] == $userinfo->id))
				<img src="{{ URL::asset('mobile/image/analystcenter/sz.png') }}" onclick="setup();">
			@endif
		</div>
	</div>
	<div>
		<div>
			@if($userinfo->grade == 0)
                <img src="{{ URL::asset('mobile/image/analystcenter/0dengji.png') }}" alt=""> 
            @elseif($userinfo->grade == 1)
                <img src="{{ URL::asset('mobile/image/analystcenter/1dengji.png') }}" alt="">
            @elseif($userinfo->grade == 2)
                <img src="{{ URL::asset('mobile/image/analystcenter/2dengji.png') }}" alt=""> 
            @elseif($userinfo->grade == 3)
                <img src="{{ URL::asset('mobile/image/analystcenter/3dengji.png') }}" alt=""> 
            @elseif($userinfo->grade == 4)
                <img src="{{ URL::asset('mobile/image/analystcenter/4dengji.png') }}" alt=""> 
            @endif
			<!-- <img src="{{ URL::asset('mobile/image/analystcenter/by.png') }}"> -->
		</div>
	  <span>
	  		@if($userinfo->star == 1)
                <img src="{{ URL::asset('mobile/image/analystcenter/xl.png') }}" alt="">
                <img src="{{ URL::asset('mobile/image/analystcenter/xh.png') }}" alt="">
                <img src="{{ URL::asset('mobile/image/analystcenter/xh.png') }}" alt=""> 
            @elseif($userinfo->star == 2)
                <img src="{{ URL::asset('mobile/image/analystcenter/xl.png') }}" alt="">
                <img src="{{ URL::asset('mobile/image/analystcenter/xl.png') }}" alt="">
                <img src="{{ URL::asset('mobile/image/analystcenter/xh.png') }}" alt=""> 
            @elseif($userinfo->star == 3)
                <img src="{{ URL::asset('mobile/image/analystcenter/xl.png') }}" alt="">
                <img src="{{ URL::asset('mobile/image/analystcenter/xl.png') }}" alt="">
                <img src="{{ URL::asset('mobile/image/analystcenter/xl.png') }}" alt=""> 
            @endif
	  		<!-- <img src="{{ URL::asset('mobile/image/analystcenter/xl.png') }}">
	  		<img src="{{ URL::asset('mobile/image/analystcenter/xl.png') }}">
	  		<img src="{{ URL::asset('mobile/image/analystcenter/xl.png') }}"> -->
	  </span>	
		
	</div>
	<div>
		<div>
		@if(session('eai')['id'] && (session('eai')['id'] == $userinfo->id))
			<img src="{{ URL::asset('mobile/image/analystcenter/xx.png') }}">
		@endif	
		</div>
	</div>
	<p>
            <img src="@if($userinfo->photo) {{$userinfo->photo}} @else {{ URL::asset('/ucenter/images/head portrait.png') }} @endif">
            @if($userinfo->isvip != '0' || $userinfo->authstatus == '2')
                <img src="{{ URL::asset('mobile/image/analystcenter/vip.png') }}">
            @endif
	</p>
</div>
<!-- 名称 -->
<div class="j_name">
	<h1>{{ $userinfo->username}}
  @if($userinfo->authstatus == '2' && $userinfo->isanalyst == '1')
      <img src="{{ URL::asset('mobile/image/analystcenter/rz.png') }}" alt=""> <!-- 认证大师 -->
   @else
      <img src="{{ URL::asset('mobile/image/analystcenter/tomorrow.png') }}" alt=""> <!-- 明日之星 -->
  @endif
  </h1>
	<h3><span>职称：&nbsp;</span>
		@if($userinfo->grade == 0) 
			交易能手 
		@elseif($userinfo->grade == 1) 
			交易高手 
		@elseif($userinfo->grade == 2) 
			分析专家 
		@elseif($userinfo->grade == 3) 
			操盘大师 
		@elseif($userinfo->grade == 4) 
			金融宗师 
		@endif

	</h3>
	<div>
		<div>连胜&nbsp;&nbsp;&nbsp;<span><span>{{ $userinfo->liansheng }}/</span>5</span></div>
		<div>连亏&nbsp;&nbsp;&nbsp;<span><span class="green">{{ $userinfo->lianbai }}/</span>3</span></div>
	</div>
</div>
<!-- 总收益点位 -->
<section>
	<div>
		<div>
			<div><span class="numZi">{{ round($allprofit,2) }}</span>点</div>
			<p>总收益</p>
		</div>
		<div>
			<div>
				<span class="numZi">
					@if($data['allnum'] != 0)
	                    {{ $data['allnum'] }}
	                @else
	                    0
	                @endif
                </span>笔
            </div>
			<p style="color: #30353C;" onclick="detail()">我的策略</p>
		</div>
		<!-- <div onclick="withdrawals()">
			<div><span><img src="{{ URL::asset('mobile/image/analystcenter/money.png') }}"></span></div>
			<p>提现管理</p>
		</div> -->
	</div>
</section>
<!-- 正在持仓 -->
<section class="j_cc">
	<div>
		<div>
			<div><span class="numZi">{{$memdelinfo['orderTakeNum']}}</span></div>
			<p>正在持仓</p>
		</div>
		<div>
			<div><span class="numZi">{{$memdelinfo['weekfinalpoint'] == null?0: round( $memdelinfo['weekfinalpoint'],2) }}</span></div>
			<p>本周收益</p>
		</div>
		<div onclick="fmygendan()">
			<div><span><img src="{{ URL::asset('mobile/image/analystcenter/dd.png') }}"></span></div>
			<p>我的订阅</p>
		</div>
	</div>
</section>
<!-- 订阅管理 -->
<section class="j_gl">
	<div>
		<div onclick="comment()">
			<div><span><img src="{{ URL::asset('mobile/image/analystcenter/gs.png') }}"></span></div>
			<p>订阅评论</p>
		</div>
		<div onclick="tongjidata()">
			<div><span><img src="{{ URL::asset('mobile/image/analystcenter/sj.png') }}"></span></div>
			<p>数据统计</p>
		</div>
		<div>
			<div><span><img src="{{ URL::asset('mobile/image/analystcenter/jy.png') }}"></span></div>
			<p>交易报表</p>
		</div>
	</div>
</section>
<!-- 联系客服，关于我们 -->
<section class="j_tel">
	<div>
		<a href="tel://400-8088-189">
			<span></span>
			<span>联系客服</span>
			<span></span>
		</a>
	</div>
	<!-- <div>
		<a href="javascript:;">
			<span></span>
			<span>我的订单</span>
			<span></span>
		</a>
	</div> -->
	<div>
		<a href="javascript:;">
			<span></span>
			<span>关于我们</span>
			<span></span>
		</a>
	</div>
	<div>
		<a href="javascript:;">
			<span></span>
			<span>帮助中心</span>
			<span></span>
		</a>
	</div>
</section>
<!-- 底部 -->
<div style="height: 2rem;"></div>
@include('newmobile.footer')
<style>
  /*底部行情应用样式*/
  footer ul li:nth-child(4) a {
    color: #3B9CE0;
  }
  footer ul li:nth-child(4) a i {
    background: url("{{URL::asset('mobile/image/me_icond.png')}}") no-repeat center / cover;
  }
</style>
<!-- js引入 -->
<script src="{{URL::asset('public_js/jquery-3.2.1.min.js')}}"></script>
<script src="{{URL::asset('mobile/js/public.js') }}"></script>
<script>
//去我的策略
function detail() {
	var myhandan = '{{ url("/myhandan") }}';
	window.location.href = myhandan+"?userid="+'{{$_GET["id"]}}';
}
// 分析师个人中心我的订阅
function fmygendan() {
//	var myhandan = '{{ url("/fgendan") }}';
//	window.location.href = myhandan+"?id="+'{{$_GET["id"]}}';
        alert("请在PC端查看");
}
//去订阅评论
function comment(){
	var fcomment = '{{ url("/fcomment") }}';
	window.location.href = fcomment+"?userid="+'{{$_GET["id"]}}';
}
//去数据统计
function tongjidata(userid){
	var fdata = '{{ url("/fdata") }}';
	window.location.href = fdata+"?userid="+'{{$_GET["id"]}}';
}
// 设置
function setup() {
	var myhandan = '{{ url("/setup") }}';
	window.location.href = myhandan+"?id="+'{{$_GET["id"]}}';
}
// 提现管理
function withdrawals() {
	var myhandan = '{{ url("/withdrawals") }}';
	window.location.href = myhandan;
}

wx.config({
	debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
	appId: "{{$configarr['appId']}}", // 必填，公众号的唯一标识
	timestamp: "{{$configarr['timestamp']}}", // 必填，生成签名的时间戳
	nonceStr: "{{$configarr['nonceStr']}}", // 必填，生成签名的随机串
	signature: "{{$configarr['signature']}}",// 必填，签名，见附录1
	jsApiList: [
		'checkJsApi',
		'onMenuShareTimeline',
		'onMenuShareAppMessage',
		'onMenuShareQQ',
		'onMenuShareWeibo',
		'hideMenuItems',
		'showMenuItems'
	] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
});
wx.ready(function () {
	var title = '个人中心';
	var desc  = '让交易变得更智能';
	var link  = '{{ url("/home") }}?id='+'{{$_GET["id"]}}';
	var imgurl = 'http://www.eaifx.com/index/images/minbanner.png';
	// 监听“分享给朋友”，按钮点击、自定义分享内容及分享结果接口
	wx.onMenuShareAppMessage({
		title: title,
		desc: desc,
		link: link,
		imgUrl: imgurl,
		trigger: function (res) {
			// 不要尝试在trigger中使用ajax异步请求修改本次分享的内容，因为客户端分享操作是一个同步操作，这时候使用ajax的回包会还没有返回
//					alert('用户点击发送给朋友');
		},
		success: function (res) {
			alert('已分享');
		},
		cancel: function (res) {
			alert('已取消');
		},
		fail: function (res) {
//                alert(JSON.stringify(res));
			alert('分享失败');
		}
	});

	// 监听“分享到朋友圈”按钮点击、自定义分享内容及分享结果接口
	wx.onMenuShareTimeline({
		title: title,
		link: link,
		imgUrl: imgurl,
		trigger: function (res) {
			// 不要尝试在trigger中使用ajax异步请求修改本次分享的内容，因为客户端分享操作是一个同步操作，这时候使用ajax的回包会还没有返回
//					alert('用户点击分享到朋友圈');
		},
		success: function (res) {
			alert('已分享');
		},
		cancel: function (res) {
			alert('已取消');
		},
		fail: function (res) {
			alert(JSON.stringify(res));
		}
	});

	// 监听“分享到QQ”按钮点击、自定义分享内容及分享结果接口
	wx.onMenuShareQQ({
		title: title,
		desc: desc,
		link: link,
		imgUrl: imgurl,
		trigger: function (res) {
//					alert('用户点击分享到QQ');
		},
		complete: function (res) {
//					alert(JSON.stringify(res));
		},
		success: function (res) {
			alert('已分享');
		},
		cancel: function (res) {
			alert('已取消');
		},
		fail: function (res) {
			alert(JSON.stringify(res));
		}
	});

	// 监听“分享到微博”按钮点击、自定义分享内容及分享结果接口

	wx.onMenuShareWeibo({
		title: title,
		desc: desc,
		link: link,
		imgUrl: imgurl,
		trigger: function (res) {
//					alert('用户点击分享到微博');
		},
		complete: function (res) {
//					alert(JSON.stringify(res));
		},
		success: function (res) {
			alert('已分享');
		},
		cancel: function (res) {
			alert('已取消');
		},
		fail: function (res) {
			alert(JSON.stringify(res));
		}
	});

	// 监听“分享到QZone”按钮点击、自定义分享内容及分享接口
	wx.onMenuShareQZone({
		title: title,
		desc: desc,
		link: link,
		imgUrl: imgurl,
		trigger: function (res) {
//					alert('用户点击分享到QZone');
		},
		complete: function (res) {
//					alert(JSON.stringify(res));
		},
		success: function (res) {
			alert('已分享');
		},
		cancel: function (res) {
			alert('已取消');
		},
		fail: function (res) {
			alert(JSON.stringify(res));
		}
	});
});
</script>
</body>
</html>
    	
